<?php defined('InShopNC') or exit('Access Invalid!'); ?>

<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/fancybox/jquery.fancybox-1.3.1.pack.js"></script>
<link href="<?php echo RESOURCE_SITE_URL; ?>/js/fancybox/fancybox.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=P2FNtzxNufSlwBx3Gt3GYhxR"></script>
<div class="block box">
    <div style="background: url('/public/src/images/line.gif') no-repeat bottom; margin-right: 10px; padding-bottom: 10px;">
        <img src="/public/src/images/frachiser_show_cate1.gif"/>
    </div>
</div>
<div class="blank"></div>
<div class="block clearfix">
    <div class="container">
        <div class="box">
            <div class="box_1">
                <div style="border:0 solid #fcf8f7; background-color:#fff; padding:10px 0; ">
                    <div>
                        <div style="float: left; width: 550px;">
                        <div style="width: 135px;height: 100px; padding: 7px;border: 1px #eeeeee solid; float: left;">
                            <img src="/data/upload/shop/article/<?php echo $output['article']['franchiser']['file_name']?>" width="135" height="100" />
                        </div>
                        <div style="width: 380px; float:left; margin-left: 10px;">
                            <ul>
                                <li style="font-weight: bold;line-height: 200%; font-size: 14px;"><?php echo $output['article']['franchiser']['franchisee_name']; ?></li>
                                <li style="line-height: 200%; font-size: 14px;">地址：<?php echo $output['article']['franchiser']['franchisee_address']; ?></li>
                                <li style="line-height: 200%; font-size: 14px;">联系：<?php echo $output['article']['franchiser']['linkname'] ?></li>
                                <li style="line-height: 200%; font-size: 14px;">电话：<?php echo $output['article']['franchiser']['linkname_mobile'] ?></li>
                            </ul>

                        </div>
                        <div style="margin: 20px;font-size: 14px; float:left; width: 520px;">
                            简介：<?php echo $output['article']['article_content']; ?>
                        </div>
                        </div>
                        <div style="width: 440px; height: 300px; float:left; margin-left: 0px; border: 1px #000000 solid;" id="baidumap"></div>
                        <br style="clear: both;" />

                    </div>

                </div>
            </div>
        </div>
        <div class="blank"></div>
    </div>
</div>
<div class="block box">
    <div style="background: url('/public/src/images/line.gif') no-repeat bottom; margin-right: 10px; padding-bottom: 10px;">
        <img src="/public/src/images/frachiser_show_cate2.gif"/>
    </div>
</div>
<div class="block clearfix">
    <div class="container">
        <div class="box">
            <div class="box_1">
                <div style="border:0 solid #fcf8f7; background-color:#fff; padding:10px 0; ">
                    <?php
                    foreach($output['article']['img_list'] as $key=>$img_list)
                    {
                        echo "<div style='width: 150px;height: 115px;;border: #cccccc 1px solid;float: left;margin: 10px 0 0 10px;'>".
                            "<div style='width: 135px;height: 100px;  overflow: hidden;margin:8px; '>".
                            "<a rel='image_group' title='图片$key' href='".$img_list."'><img src='".$img_list."' style='max-width:135px;' /></a></div></div>";
                    }
                    ?>
                </div>
            </div>
        </div>
        <div class="blank"></div>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $("a[rel=image_group]").fancybox({
            'titlePosition' : 'over',
            'cyclic'        : true,
            'titleFormat'	: function(title, currentArray, currentIndex, currentOpts) {
                return '<span id="fancybox-title-over">' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' &nbsp; ' + title : '') + '</span>';
            }
        });
    });
</script>
<script type="text/javascript">
    $(function(){
        var mapPointstr= "<?php echo $output['article']['franchiser']['mapPoint']?>";
        var mapPoint = mapPointstr.split(',');

        var map = new BMap.Map("baidumap");
        var point = new BMap.Point(mapPoint[0],mapPoint[1]);
        map.centerAndZoom(point, 18);
        var marker = new BMap.Marker(point);
        marker.addEventListener("click",function(){
            //点击坐标点后缩放至最大级别并将该点设为中心点
            map.setZoom(18);
            map.setCenter(point);
        });
        map.addControl(new BMap.NavigationControl());

        map.addControl(new BMap.GeolocationControl());

        map.addOverlay(marker);

    });
</script>